import 'package:flutter/material.dart';

class DrawerDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("drawer demo"),
        centerTitle: true,
      ),
      drawer: Drawer(
        child: ListView(
          children: [
            UserAccountsDrawerHeader(
              accountName: Text("username"),
              accountEmail: Text("useremail.com"),
              currentAccountPicture: CircleAvatar(
                backgroundImage: AssetImage(""),
              ),
            ),
            TextButton(
                onPressed: () => {
                      ScaffoldMessenger.of(context).showSnackBar(
                          SnackBar(content: Text("you click 个性装扮")))
                    },
                child: ListTile(
                  leading: CircleAvatar(
                    child: Icon(Icons.color_lens),
                  ),
                  title: Text("个性装扮"),
                )),
            TextButton(
              onPressed: () => {},
              child: ListTile(
                leading: CircleAvatar(
                  child: Icon(Icons.phone),
                ),
                title: Text("我的相册"),
              ),
            ),
            TextButton(
                onPressed: () => {},
                child: ListTile(
                  leading: CircleAvatar(
                    child: Icon(Icons.wifi),
                  ),
                  title: Text("免流量特权"),
                )),
          ],
        ),
      ),
    );
  }
}
